.PHONY:all
all: TcpServer TcpClient

#注释下面这句宏定义，采用json的默认方案
# LDFLAG=-DSELF=1

TcpServer:ServerMain.cc
	g++ -o $@ $^ $(LDFLAG) -std=c++14 -lpthread -ljsoncpp

TcpClient:ClientMain.cc
	g++ -o $@ $^ $(LDFLAG) -std=c++14 -ljsoncpp 

.PHONY:clean
clean:
	rm -rf TcpServer TcpClient